const https = require('https');
const fs = require('fs');

const options = {
    key: fs.readFileSync('../ca/my-site.key'),
    cert: fs.readFileSync('../ca/my-site.crt')
};


https.createServer(options, (req, res) => {
    const {url, method} = req;
    console.log(req.headers['host']);
    console.log(method);
    res.writeHead(200);
    res.end('Hello World\n');
}).listen(8000);